<template>
  <div>
    <!--数据列表-->
    <div class="table-container">
      <vxe-grid ref='alllineListPLxGrid' v-bind="gridOptions"  size="mini" :loading="listLoading">
        <template #form>
          <div>
            <!--搜索-->
            <el-form :inline="true" :model="listQuery" size="mini" label-width="100px">
              <el-form-item label="客户名称：">
                <el-select
                  clearable
                  v-model="listQuery.keyword"
                  filterable
                  remote
                  reserve-keyword
                  placeholder="请输入关键词"
                  :remote-method="querySearch">
                  <el-option
                    v-for="item in querySearchList"
                    :key="item.customerId"
                    :label="item.customerName"
                    :value="item.customerName">
                  </el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="最新跟进时间：">
                <el-date-picker
                  v-model="listQuery.cglTrackingTime"
                  type="daterange"
                  format="yyyy 年 MM 月 dd 日"
                  value-format="yyyy-MM-dd"
                  range-separator="至"
                  start-placeholder="开始日期"
                  end-placeholder="结束日期">
                </el-date-picker>
              </el-form-item>
              <el-form-item label="未跟进天数：">
                <el-select v-model="listQuery.cglTrackingTimeType" clearable>
                  <el-option value="sevenDaysMore" label="超7天"></el-option>
                  <el-option value="fifteenDaysMore" label="超15天"></el-option>
                  <el-option value="thirtyDaysMore" label="超30天"></el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="最新成交时间：">
                <el-date-picker
                  v-model="listQuery.cglOrderTime"
                  type="daterange"
                  format="yyyy 年 MM 月 dd 日"
                  value-format="yyyy-MM-dd"
                  range-separator="至"
                  start-placeholder="开始日期"
                  end-placeholder="结束日期">
                </el-date-picker>
              </el-form-item>
              <el-form-item label="未成交天数：">
                <el-select v-model="listQuery.cglOrderTimeType" clearable>
                  <el-option value="sevenDaysMore" label="超7天"></el-option>
                  <el-option value="fifteenDaysMore" label="超15天"></el-option>
                  <el-option value="thirtyDays" label="超30天"></el-option>
                  <el-option value="thirtyDaysMore" label="超60天"></el-option>
                  <el-option value="ninetyDaysMore" label="超90天"></el-option>
                </el-select>
              </el-form-item>

              <el-form-item label="产品线：">
                <el-select v-model="listQuery.goodsLineId" filterable clearable>
                  <el-option :label="item.cddValue" v-for="item in goodsLineList" :value="item.cddId" :key="item.cddId"></el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="负责日期：">
                <el-date-picker
                  :clearable="false"
                  v-model="listQuery.cglMyChargeTime"
                  type="daterange"
                  format="yyyy 年 MM 月 dd 日"
                  value-format="yyyy-MM-dd"
                  range-separator="至"
                  start-placeholder="开始日期"
                  end-placeholder="结束日期">
                </el-date-picker>
              </el-form-item>
              <el-form-item label="创建时间：">
                <el-date-picker
                  :clearable="false"
                  v-model="listQuery.cglCreateTime"
                  type="daterange"
                  format="yyyy 年 MM 月 dd 日"
                  value-format="yyyy-MM-dd"
                  range-separator="至"
                  start-placeholder="开始日期"
                  end-placeholder="结束日期">
                </el-date-picker>
              </el-form-item>
              <el-form-item label="排序：">
                <el-select v-model="listQuery.sort"  placeholder="请选择" clearable>
                  <el-option key="1" label="最新跟进时间倒序" value="1"></el-option>
                  <el-option key="2" label="最新跟进时间升序" value="2"></el-option>
                  <el-option key="3" label="最新成交时间倒序" value="3"></el-option>
                  <el-option key="4" label="最新成交时间升序" value="4"></el-option>
                  <el-option key="5" label="成交量升序" value="5"></el-option>
                  <el-option key="6" label="成交量倒序" value="6"></el-option>
                  <el-option key="7" label="持有时间倒序" value="7"></el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="负责人：">
                <el-select v-model="listQuery.chargeId"  placeholder="请选择" clearable filterable multiple >
                  <el-option
                    v-for="item in userOptionList2"
                    :key="item.userId"
                    :label="item.realName"
                    :value="item.userId">
                  </el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="潜在等级：">
                <el-select v-model="listQuery.cglCustomerPotential" class="input-width" style="width:195px" placeholder="请选择" multiple>
                  <el-option
                    v-for="item in customerPotentialList"
                    :key="item.customerPotentialId"
                    :label="item.customerPotentialValue"
                    :value="item.customerPotentialId">
                  </el-option>
                  <el-option
                    :key="0"
                    label="无潜在等级"
                    :value="0">
                  </el-option>
                </el-select>
              </el-form-item>

              <el-form-item label="目标开发阶段：">
                <el-select v-model="listQuery.cglTargetDevelopState"  placeholder="请选择" clearable>
                  <el-option :label="item.name" :value="item.id" :key="item.id" v-for="item in developSteps" v-if="item.id > 0"></el-option>
                </el-select>
              </el-form-item>

              <el-form-item label="阶段更新时间：">
                <el-date-picker
                  v-model="listQuery.cglDevelopChangeTime"
                  type="daterange"
                  format="yyyy 年 MM 月 dd 日"
                  value-format="yyyy-MM-dd"
                  range-separator="至"
                  start-placeholder="开始日期"
                  end-placeholder="结束日期">
                </el-date-picker>
              </el-form-item>

              <el-form-item label="是否设置目标：">
                <el-select v-model="listQuery.isTarget"  placeholder="请选择" clearable>
                  <el-option label="是" :value="1" ></el-option>
                  <el-option label="否" :value="2" ></el-option>
                </el-select>
              </el-form-item>

              <el-form-item label="目标状态：">
                <el-select v-model="listQuery.devState"  placeholder="请选择" clearable>
                  <el-option :label="item.name" :value="item.id" :key="item.id" v-for="item in devStates"></el-option>
                </el-select>
              </el-form-item>

              <el-form-item label="是否成交：">
                <el-select v-model="listQuery.isDeal"  placeholder="请选择" clearable>
                  <el-option label="是" :value="1" ></el-option>
                  <el-option label="否" :value="0" ></el-option>
                </el-select>
              </el-form-item>

              <el-form-item>
                <el-button
                  @click="handleSearchList()"
                  type="primary">
                  查询
                </el-button>
              </el-form-item>
            </el-form>
          </div>
        </template>
        <template #pager>
          <div style="overflow: hidden">
            <div class="pagination-container">
              <el-pagination
                background
                @size-change="handleSizeChange"
                @current-change="handleCurrentChange"
                layout="total, sizes,prev, pager, next,jumper"
                :current-page.sync="listQuery.pageNum"
                :page-size="listQuery.pageSize"
                :page-sizes="[10,15,20,50,100,200]"
                :total="count">
              </el-pagination>
            </div>
          </div>
        </template>
        <template #toolbar_buttons>
          <el-button type="primary" size="small" @click="moveLine('public')" v-if="listQuery.tab == 'delete'">恢复到公海</el-button>
          <el-button type="primary" size="small" @click="moveLine('user')" v-if="listQuery.tab == 'all' || listQuery.tab == 'delete' || (listQuery.tab == 'common' && customerByGHCMove)">转移</el-button>
          <export-pop ref="exportPop" @click.native="downloadExcel" v-if="(listQuery.tab == 'all' && exportAllGoodsLine) || (listQuery.tab == 'common' && customerByGHCExport )"></export-pop>
          <el-button type="primary" size="small" v-if="(listQuery.tab == 'common' && customerByGHCDel) || listQuery.tab == 'all'  " @click="moveLine('delete')">移入回收站</el-button>
          <el-button type="primary" size="small" @click="batchUpdate" v-if="listQuery.tab == 'all'">批量转移客户产品线</el-button>
          <el-button type="primary" size="small" v-if="listQuery.tab == 'all'" @click="moveLine('public')">转入公海</el-button>
          <div style="margin:10px 0">
            <el-radio-group v-model="listQuery.cglCurrentDevelopState" @change="handleSearchList" size="small">
              <el-radio-button :label="item.id" v-for="(item,index) in developSteps" :key="item.id">
                {{ item.name }} <span><span v-if="index > 0">{{numCount[index-1] ? '('+numCount[index-1]+')' : ''}}</span></span>
              </el-radio-button>
            </el-radio-group>
          </div>
        </template>
        <template #num1_default="{ row, rowIndex }">
          <div @click="toDetail(row)" type="primary"  style="font-size:12px;vertical-align: middle;cursor:pointer;text-align: center;color:#409EFF">
            <div>{{row.customerName}}</div>
            <div>{{row.kingNumber}}</div>
          </div>
        </template>

        <template #num2_default="{ row, rowIndex }">
          <span v-for="item in row.relationCustomers" style="padding-left:10px">{{item.customerName}}</span>
        </template>
      </vxe-grid>
    </div>
    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="dialogVisible" width="500px">
      <el-form :model="form" size="mini" label-width="100px" ref="form" :rules="rules">
        <div style="padding-bottom:20px;">{{ popcon }}</div>
        <el-form-item label="转移到：" prop="target" v-if="popType=='user'">
          <el-select v-model="form.target" filterable placeholder="请选择" clearable>
            <el-option
              v-for="item in userOptionList"
              :key="item.userId"
              :label="item.userName"
              :value="item.userId">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="备注：" label-width="80px" v-if="popType == 'public' || popType == 'delete'" prop="remark">
          <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.remark"></el-input>
        </el-form-item>
      </el-form>

      <span slot="footer" class="dialog-footer">
          <el-button @click="dialogVisible = false">取 消</el-button>
          <el-button type="primary" @click="handleConfirm" :loading="btnLoading">确 定</el-button>
      </span>
    </el-dialog>

    <import-pop ref="importPop" @getList="handleSearchList"></import-pop>

    <gjList ref="gjList"></gjList>
    <lxrList ref="lxrList"></lxrList>
    <addProgress ref="addProgress" @getSteps="getList"></addProgress>
    <addGj ref="addGj" @getList="getList"></addGj>

  </div>
</template>
<script>
import {getCustomerOption,getOrderUsersList,getUserOption,customerPotential,getCustomerSetting} from '@/api/partner'
import {goodsLineMyGoodsLine,productCustomersTagList,goodsLineMove,shareGoodsLine,deleteGoodsLine,commonGoodsLine,myAllTags,productCustomersAddTag,customerAllGoodsLine} from '@/api/company'
import {formatDate} from '@/utils/date';
import exportPop from './exportPop.vue'
import gjList from './gjList';
import lxrList from './lxrList';
import addProgress from './addProgress';
import importPop from './importPop';
import addGj from './addGj';
import store from '@/store'
import { mapGetters } from 'vuex'

const defaultListQuery={
  tab:'',
  'devState' :'',                 //目标状态 1逾期 2进行中 3已完成
  'cglCurrentDevelopState' :'',                 //当前开发阶段
  'cglTargetDevelopState'   :'',               //目标开发阶段
  'cglDevelopChangeTime' :[],                //阶段时间
  'isTarget'   :'',              //目标状态 1设置 2不设置
  isDeal:'',
  "chargeId" : [], //负责人ID
  "keyword" : "", //客户名称搜索
  "goodsLineId" : '', //客户产品线
  "cglCustomerPotential" : "", //潜在等级
  "cglMyChargeTime" : [], //负责日期范围
  "cglCreateTime" : [], //创建时间
  cglTrackingTime:[],//最新跟进时间
  cglOrderTime:[],//最新成交时间
  "cglTrackingTimeType" : "", //跟进时间时间类型(今天-today,7天内-sevenDays,超7天-sevenDaysMore,超15天-fifteenDaysMore，超30天-thirtyDaysMore)
  "cglOrderTimeType" : "",  //最新成交时间类型(超7天-sevenDaysMore，超15天-fifteenDaysMore，超30天-thirtyDays,超60天-thirtyDaysMore，超90天-ninetyDaysMore)
  "sort" : "", //排序(最近跟进时间-trackingTimeDesc,最近成交时间-cglOrderTime,最新跟进成交时间-trackingOrderTime)
  "pageNum" : 1,
  "pageSize" : 10
};
const defaultForm = {
  cglIds:'',
  remark:'',
  target:''//移入公海，回收站 1 ，称出公海，回收站0
};

const defaultForm2 = {
  cglIds:'',
  tagIds:[]
};

const defaultForm3 = {
  type:2,
  name:''
};
export default {
  name: "index",
  data(){
    return {
      listQuery: JSON.parse(JSON.stringify(defaultListQuery)),
      count: 0,
      listLoading: false,
      roles:store.getters.roles ? store.getters.roles : [],
      gridOptions:{
        border: true,
        id: 'allcustomersPL',
        align:'center',
        rowConfig: {
          keyField: 'cglId',
          isHover: true
        },
        columnConfig: {
          resizable: true
        },
        customConfig: {
          storage: true,
        },
        toolbarConfig: {
          zoom: true,
          custom: true,
          slots: {
            buttons: 'toolbar_buttons',
          },
          className:'mytoolbar',
        },
        spanMethod({ row, rowIndex, $rowIndex, _rowIndex, column, columnIndex, $columnIndex, _columnIndex, visibleData }){
          let fields = ['customerName']
          if(!fields.includes(column['field'])){
            return { rowspan: 1, colspan: 1 }
          }else if(row['isMerge'] && (fields.includes(column['field']))){
            return { rowspan: row['rowNum'], colspan: 1 }
          }else {
            return { rowspan: 0, colspan: 0 }
          }

        },
        columns: [

          { type: 'checkbox',
            title: '',
            fixed:'left',
            width: 50,
          },
          {
            field: 'customerName',
            title: '客户名称',
            width: 150,
            slots: {
              // 使用插槽模板渲染
              default: 'num1_default',
            }
          },
          {
            field: 'goodsLineName',
            title: '产品线',
            width: 150,
          },
          {
            field: 'relationCustomers',
            title: '子客户',
            showOverflow:true,
            width: 150
          },
          {
            field: 'cglUserName',
            title: '负责人',
            width: 100,
          }, {
            field: 'cglMyChargeTime',
            title: '负责日期',
            width: 150,
          },
          {
            field: 'customerPotential',
            title: '潜在等级',
            width: 150,
          },
          {
            field: 'chargeDayNum',
            title: '持有天数',
            width: 100,
          },
          {
            field: 'cglMonthBuyNum',
            title: '预计月使用量',
            width: 100,
          },
          {
            field: 'cglOrderNum',
            title: '成交量',
            width: 100,
          },
          {
            field: 'abutmentNum',
            title: '转售量',
            width: 100,
          },
          {
            field: 'cglOrderTime',
            title: '最近成交时间',
            width: 150,
          },
          {
            field: 'cglTrackingTime',
            title: '最近跟进时间',
            width: 150,
          },
          {
            field: 'cglTrackingContent',
            title: '最近跟进内容',
            showOverflow:true,
            width: 150,
          },
          {
            field: 'cglCurrentDevelopState',
            title: '当前阶段',
            width: 100,
          },
          {
            field: 'cglCustomerFocusStr',
            title: '客户关注点',
            width: 150,
          },
          {
            field: 'cglBuyHabitsStr',
            title: '采购习惯',
            width: 150,
          },
          {
            field: 'goodsSn',
            title: '使用材料',
            width: 150,
          },
          {
            field: 'goodsMatchDegree',
            title: '产品匹配',
            width: 150,
          },
          {
            field: 'cglTargetDevelopState',
            title: '目标开发阶段',
            width: 150,
          },
          {
            field: 'cglTargetFinishedDate',
            title: '预计开发完成时间',
            width: 150,
          },
          {
            field: 'cglTargetTrackingNum',
            title: '月目标有效跟进次数',
            width: 150,
          },
          {
            field: 'cglActualTrackingNum',
            title: '实际月有效跟进次数',
            width: 150,
          },
          {
            field: 'shareUserNames',
            title: '共享人 ',
            width: 150,
          },{
            field: 'createTime',
            title: '创建日期 ',
            width: 150,
          },{
            field: 'updateTime',
            title: '更新日期 ',
            width: 150,
          },
          {
            field: 'cglCommonLabel',
            title: '公海标签 ',
            showOverflow:true,
            width: 150,
          },
          {
            field: 'cglCustomerLabel',
            title: '客户标签 ',
            showOverflow:true,
            width: 150,
          },
          {
            field: 'takIngCount',
            title: '总跟进次数',
            width: 150,
          },
          {
            field: 'trackingTime',
            title: '最进一次跟进距今日天数',
            width: 100,
          },

          {
            field: '',
            title: '操作',
            width: 220,
            fixed:'right',
            slots: {
              // 使用 JSX 渲染
              default: ({ row }) => {
                if(this.listQuery.tab == 'all'){
                  return [
                    <el-button style="margin-right:10px;" type="text" size="small" onClick={ () => this.showAddgj(row) }>增加跟进</el-button>,
                    <el-button style="margin-right:10px;" type="text" size="small" onClick={ () => this.showPop2(row) }>跟进记录</el-button>,
                    // <el-button style="margin-right:10px;" type="text" size="small" onClick={ () => this.showPop3(row) }>联系人</el-button>,
                    // <el-button style="margin-right:10px;" type="text" size="small" onClick={ () => this.showZQ(row) }>设置开发周期</el-button>,
                  ]
                }else{
                  return  ''
                }
              }
            },
          },
        ],
        data:[],
      },

      querySearchList:[],
      options:[],
      customerSourceList:[],
      customerPotentialList:[],
      customerTypeList:[],
      options2:[],
      labels:[],
      goodsLineList:[],

      title:'',
      popcon:'',
      popType:'',
      dialogVisible:false,
      btnLoading:false,
      form:JSON.parse(JSON.stringify(defaultForm)),
      userOptionList:[],
      rules:{
        target: [{required: true, message: '此项必填', trigger: 'change'},],
        remark:[{required: true, message: '此项必填', trigger: 'blur'},],
      },
      devStates:[{name:'超期',id:'1'},{name:'进行中',id:'2'},{name:'已完成',id:'3'}],
      developSteps:[
        {name:'全部',id:''},{name:'寻找关键人',id:10},{name:'挖掘需求',id:20},{name:'建立粘度',id:30},{name:'促成交',id:40},
      ],
      numCount:[],
      userOptionList2:[],
    }
  },
  computed: {
    ...mapGetters([
      'name',
      'mobile',
      'userId'
    ]),
    customerByGHCMove (){
      if(this.roles.indexOf("customerByGHCMove") != -1){
        return true
      }else{
        return false
      }
    },
    customerByGHCDel(){
      if(this.roles.indexOf("customerByGHCDel") != -1){
        return true
      }else{
        return false
      }
    },
    customerByGHCExport(){
      if(this.roles.indexOf("customerByGHCExport") != -1){
        return true
      }else{
        return false
      }
    },
    exportAllGoodsLine(){
      if(this.roles.indexOf("exportAllGoodsLine") != -1){
        return true
      }else{
        return false
      }
    },
  },
  components : {
    gjList,
    lxrList,
    importPop,
    exportPop,
    addProgress,
    addGj
  },
  created() {


  },

  filters: {

  },
  methods:{
    //显示新增跟进
    showAddgj(item){
      this.$refs.addGj.showTracking(item,'add')
    },
    //获取潜在等级
    getCustomerPotential(){
      customerPotential().then((res)=>{
        this.customerPotentialList = res;
      })
    },
    showZQ(item){
      this.$refs.addProgress.showPop(item);
    },
    toDetail(item){
      let routeData = this.$router.resolve({name:'customerGoodsLineInfo',query:{id:item.customerId}});
      window.open(routeData.href);
    },
    downloadExcel(){
      this.$refs.exportPop.downloadExcel('exportGoodsLine',this.listQuery)
    },

    //批量转移客户产品线
    batchUpdate(){
      this.$refs.importPop.showImport('importAllLine','批量转移客户产品线','/api/customerNew/download',)
    },


    //显示跟进记录
    showPop2(item){
      this.$refs.gjList.showPop(item,'goodsLine')
    },
    //显示联系人
    showPop3(item){
      this.$refs.lxrList.showPop(item,'goodsLine')
    },

    //显示新建标签
    addLabel(){
      this.dialogVisible3 = true;
      this.form3 = JSON.parse(JSON.stringify(defaultForm3))
    },
    //获取员工下拉选项
    getUserOptionList(){
      let data = {status:1}
      if(this.listQuery.tab == 'common'){
        data.tab = 'public'
      }
      getOrderUsersList(data).then((res)=>{
        this.userOptionList = res;
      })
    },
    //获取员工下拉选项
    getUserOptionList2(){
      getUserOption().then((res)=>{
        this.userOptionList2 = res;
      })
    },

    //产品线转移
    moveLine(type){
      let list = this.$refs.alllineListPLxGrid.getCheckboxReserveRecords();
      let list2 = this.$refs.alllineListPLxGrid.getCheckboxRecords();
      let records = JSON.parse(JSON.stringify(list.concat(list2)));
      console.log("records",records)
      if(records.length == 0){
        this.$message({
          type: 'info',
          message: '请先选择记录！'
        });
        return false
      }
      this.popType = type
      switch (type){
        case 'user':
          this.title = '产品线转移';
          this.popcon = '将产品线转移动其它负责人'
          break;
        case 'public':
          this.title = '恢复到公海';
          this.popcon = '将客户产品线恢复到公海'
          break;
        case 'delete':
          this.title = '移入回收站';
          this.popcon = '客户产品线移入到回收站'
          break;
      }
      this.dialogVisible = true;
      this.form = JSON.parse(JSON.stringify(defaultForm));
      let cglIds = []
      records.forEach((el)=>{
        cglIds.push(el.cglId)
      })
      this.form.cglIds = cglIds.join(",")
    },

    //确认客户转移
    handleConfirm(){
      this.$refs['form'].validate((valid) => {
        if (valid) {
          this.btnLoading = true;
          let data = JSON.parse(JSON.stringify(this.form));
          let  fn;
          switch (this.popType){
            case 'user':
              fn = goodsLineMove
              break;
            case 'public':
              fn = commonGoodsLine
              data.target = 1;
              break;
            case 'delete':
              fn = deleteGoodsLine
              data.target = 1;
              break;
          }
          fn(data).then(()=>{
            this.btnLoading = false;
            this.dialogVisible = false;
            this.$refs.alllineListPLxGrid.clearCheckboxRow(false);
            this.$refs.alllineListPLxGrid.clearCheckboxReserve()
            this.getList()
          }).catch(()=>{
            this.btnLoading = false;
          })
        }
      })
    },


    init(key){
      this.listQuery.tab = key;
      this.handleSearchList();
      this.getUserOptionList();
      this.getUserOptionList2();
      this.getCustomerSettingList();
      this.getCustomerPotential();

    },


    //客户名称输入匹配
    querySearch(queryString){
      if(queryString && queryString!= '') {
        getCustomerOption({keywords: queryString}).then((res) => {
          this.querySearchList = res;
        })
      }
    },



    handleSizeChange(val){
      this.listQuery.pageNum = 1;
      this.listQuery.pageSize = val;
      this.getList();
    },
    handleCurrentChange(val){
      this.listQuery.pageNum = val;
      this.getList();
    },

    handleSearchList(){
      this.listQuery.pageNum = 1;
      this.getList();
    },

    //获取列表
    getList() {
      this.listLoading = true;
      let listQuery = JSON.parse(JSON.stringify(this.listQuery))
      customerAllGoodsLine(listQuery).then(response => {
        this.gridOptions.data = []
        this.numCount = [];
        this.numCount.push(response.peopleCount,response.demandCount,response.relationCount,response.dealCount)
        response.list.forEach((el,i)=>{
          let newEL = JSON.parse(JSON.stringify(el));
          delete newEL.goodsLineList
          el.goodsLineList.forEach((ee,ii)=>{
            let newEE = JSON.parse(JSON.stringify(ee));
            if(ii == 0){
              console.log("ii",ii)
              newEE.isMerge = true;
              newEE.rowNum = el.goodsLineList.length;
            }else{
              newEE.isMerge = false;
              newEE.rowNum = 0;
            }
            let copy = Object.assign({},newEL,newEE);
            this.gridOptions.data.push(copy);
          })
        })
        this.count = response.count;
        this.listLoading = false;
      }).catch(()=>{
        this.listLoading = false;
      });
    },

    //获取客户配置
    getCustomerSettingList(){
      getCustomerSetting().then((res)=>{
        res.forEach((el)=>{
          if(el.cdtCode == 'goods_line'){
            this.goodsLineList = el.data
          }
        });
      })
    },

  },
}
</script>

<style  lang="scss">
.vxe-toolbar.size--mini.mytoolbar{
  height:auto
}
</style>
